package top.yueyazhui.common.bean;

import lombok.*;

@Data
@Builder
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class Response {

    private Integer status;
    private String msg;
    private Object data;

    public static Response success(String msg) {
        return new Response(200, msg, null);
    }

    public static Response success(String msg, Object object) {
        return new Response(200, msg, object);
    }

    public static Response error(String msg) {
        return new Response(500, msg, null);
    }

    public static Response error(String msg, Object object) {
        return new Response(500, msg, object);
    }
}
